import java.util.Scanner;

public class J2025_7_9 {
    public static void main(String[] args) {
        //System.out.println(Integer.MAX_VALUE);
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int length = in.nextInt();
            int k = in.nextInt();
            int [] arr = new int[length];
            for(int i = 0;i<length;i++){
                arr[i] = in.nextInt();
            }
            in.nextLine();
            for (int i = 0; i < k; i++) {
                int index = Find(arr);
                if(index == 0){
                    if(arr[index]%2 == 0){
                        arr[index]/=2;
                    }
                }else {
                    arr[index]/=2;
                }
            }
            int ret = 0;
            for (int i = 0; i < length; i++) {
                ret+=arr[i];
            }
            System.out.println(ret);
        }
    }

    private static int Find(int[] arr) {
        int max = 0;
        for (int i = 0; i < arr.length; i++) {
            if(arr[i]%2==0&&arr[i]>arr[max]){
                max = i;
            }
        }
        return max;
    }

    public static void main6(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNext()) { // 注意 while 处理多个 case
            int len = in.nextInt();
            int x = in.nextInt();
            int [] arr = new int[len];
            for(int i = 0;i<len;i++){
                arr[i] = in.nextInt();
            }
            in.nextLine();
            int max = 0;
            int l = 0;
            int r = 0;
            int lv = 0;
            int rv = 0;
            int flag = 0;
            for (int i = 1; i < len; i++) {
                flag = max;
                if(arr[max]<arr[i]){
                    max = i;
                }
                if(flag!=max){
                    l = max;
                    for (int j = i; j < len; j++) {
                        int all = 0;
                        all+=arr[i];
                        if(all>=x){
                            r = j;
                            break;
                        }
                    }
                }
                lv = l;
                rv = r;



            }

        }
    }

    public static void main5(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNext()) { // 注意 while 处理多个 case
            String s = in.next();
            StringBuffer ret = new StringBuffer();
            ret.append(s.charAt(0));
            for (int i = 1; i < s.length(); i++) {
                if(s.charAt(i) == ' '){
                    ret.append(s.charAt(i+1));
                }
            }
            String s2 = ret.toString();
            s2 = s2.toUpperCase();
            System.out.print(s2);
        }
    }
}
